package com.carpedil.redis.mapper;

import com.carpedil.redis.entity.CityEntity;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/** @author Administrator */
@Repository
public interface CityMapper {

  int insert(CityEntity cityEntity);

  @Select(
      "select username,city,datetime from t_city where username = #{userName} and city = #{city}")
  @ResultMap("com.carpedil.redis.mapper.CityMapper.cityMap")
  List<CityEntity> findByUserNameAndDateTime(String userName, String city);
}
